As both the diversity of actions that can be performed by computing systems and the number of processing requests for each of these actions increase, there is an ever greater demand for processing bandwidth. Furthermore, when function calls are part of client-side processing, function executing can require transferring code for that function to the client, or function calls can be across a network, with results sent back to the calling system (e.g. in a callback). These transfers takes up valuable network bandwidth and delay processing response time until the data or code can be delivered.
Due to the sheer volume of functions to be executed, especially in large distributed applications such as social networking platforms, various latencies can be experienced due to the data and instruction retrieval process. These latencies can make the computing systems appear to be sluggish, and users may simply elect to use a different service. For example, some social networking sites have attracted billions of active users, all sharing links, requesting content, and sending messages. At any given time, millions of content requests can occur contemporaneously, e.g. when users visit various pages or open a feed on their social media app. Sometimes these requests repeatedly make the same function calls with the same arguments.
There have been some systems which attempt to reuse function results by storing a bit for the stored result of a function invocation to indicate whether the result is still valid. In some cases, however, the same results cannot necessarily be expected because source data (e.g. global state variables, results of other functions, or other data) changes. Using just a validity bit, the invoked function is unable to determine whether the change affects results for particular function invocations; thus a function result can be marked invalid, even when a stored result can be used in some circumstances. Therefore, in prior art systems, stored previous function results are often wasted, causing unnecessary re-execution of the code or re-obtaining data.
The techniques introduced here may be better understood by referring to the following Detailed Description in conjunction with the accompanying drawings, in which like reference numerals indicate identical or functionally similar elements.